allergen = {
    128: 'cats',
    64: 'pollen',
    32: 'chocolate',
    16: 'tomatoes',
    8: 'strawberries',
    4: 'shellfish',
    2: 'peanuts',
    1: 'egg'
}

class Allergies:

    def __init__(self, score):
        self.score = score % 256

    def allergic_to(self, item):
        return item in self.lst

    @property
    def lst(self):
        final = []
        decode = self.score
        for key, value in allergen.items():
            if key <= decode:
                final.append(value)
                decode = decode % key
        return list(reversed(final))